﻿@inherits UserBase
@page "/usermanage"
@using ZFY.UMC.Model.Dto.User
@using ZFY.UMC.Model.Dto.UserClaim

<Table TItem="GetUserListOutput"
	   IsPagination="true" PageItemsSource="@PageItemsSource" OnQueryAsync="@OnQueryAsync"  ShowExtendButtons="true" ShowDefaultButtons="false" >
	<TableColumns>
		<TableColumn Text="Id" @bind-Field="@context.Id" />
		<TableColumn Text="昵称" @bind-Field="@context.NickName" />
		<TableColumn Text="名称" @bind-Field="@context.Name" />
		<TableColumn Text="邮箱" @bind-Field="@context.Email" />
		<TableColumn Text="电话号码" @bind-Field="@context.PhoneNumber" />
		<TableColumn Text="创建时间" @bind-Field="@context.CreationTime" />
	</TableColumns>
	<RowButtonTemplate>
		<TableCellButton Size="Size.None" Color="Color.Primary" Icon="fa fa-edit" Text="声明" OnClickCallback="@(() => DisplyClaimsAsync(context))" />
	</RowButtonTemplate>
</Table>

<Modal @ref="ClaimModal" IsKeyboard="true">
	<ModalDialog Title="声明列表">
		<BodyTemplate>
			<Table @ref="ClaimTable" TItem="GetUserClaimListOutput"
				   IsPagination="true" PageItemsSource="@PageItemsSource" OnQueryAsync="@OnClaimQueryAsync">
				<TableColumns>
					<TableColumn Text="类型" @bind-Field="@context.ClaimType" />
					<TableColumn Text="值" @bind-Field="@context.ClaimValue" />
				</TableColumns>
			</Table>
		</BodyTemplate>
	</ModalDialog>
</Modal>
@*<div class="router-pagging-table">
	<p>1222221</p>
	<Button>aa11a</Button>
	@* <Table
	DataSource="_userList"
	Total="_total"
	Loading="_loading"
	PageIndex="_pageIndex"
	PageSize="_pageSize"

	OnPageIndexChange="PageIndexChanged">
	<AntDesign.Column Title="Id"  @bind-Field = "@context.Id"/>
	<AntDesign.Column Title="昵称" @bind-Field="@context.NickName" />
	<AntDesign.Column Title="名称" @bind-Field="@context.Name" />
	<AntDesign.Column Title="邮箱" @bind-Field="@context.Email" />
	<AntDesign.Column Title="电话号码" @bind-Field="@context.PhoneNumber" />
	<AntDesign.Column Title="创建时间" @bind-Field="@context.CreationTime" />
	<ActionColumn>
	<Space>
	<SpaceItem><Button Danger OnClick="()=>DisplyClaims(context.Id)">声明列表</Button></SpaceItem>
	</Space>
	</ActionColumn>
	</Table>

	<br/>
	<p>PageIndex: @_pageIndex | PageSize: @_pageSize | Total: @_total</p>

	<Modal Title="声明列表"
	Visible="_visibleClaim"
	OnOk="HandleClaimOk"
	OnCancel="HandleClaimCancle">
	<Table
	DataSource="_displayUserClamis"
	Total="_claimTotal"
	Loading="_loading"
	PageIndex="_claimPageIndex"
	PageSize="_claimPageSize"
	OnPageIndexChange="ClaimPageIndexChanged">
	<AntDesign.Column Title="类型"  @bind-Field = "context.ClaimType"/>
	<AntDesign.Column Title="值" @bind-Field="context.ClaimValue" />
	</Table>
	<br/>
	<p>PageIndex: @_claimPageIndex | PageSize: @_claimPageSize | Total: @_claimTotal</p>
	</Modal>*@